Skip to content

fix(e2e): mock Pexels API in all test fixtures and correct README - #29

Merged
makuchpatryk merged 2 commits into
feat-multi-selectfrom
copilot/sub-pr-25-another-one
Feb 23, 2026
Merged

fix(e2e): mock Pexels API in all test fixtures and correct README#29
makuchpatryk merged 2 commits into
feat-multi-selectfrom
copilot/sub-pr-25-another-one

Conversation

Copilot AI commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

The E2E README incorrectly documented that tests hit the real Pexels API, and multi-select.spec.ts referenced three fixtures (navigateToHome, selectDifficulty9x13, startGame) that were never defined in fixtures.ts, making those tests broken.

Changes

  • tests/e2e/fixtures.ts — Added the three missing fixtures used by multi-select.spec.ts. Each uses mockApiRoutes() so no real network calls are made:
navigateToHome: async ({ page }, use) => {
  await use(async () => {
    await mockApiRoutes(page);
    const getImagesResponse = page.waitForResponse("**/api/get-images**", { timeout: 30_000 });
    await page.goto("/");
    await getImagesResponse;
    await page.waitForSelector("img.w-full", { timeout: 15_000 });
  });
},
selectDifficulty9x13: async ({ page }, use) => {
  await use(async () => { await page.locator("label[for='9x13']").click(); });
},
startGame: async ({ page }, use) => {
  await use(async () => {
    await page.getByRole("button", { name: /Play/i }).click();
    await page.waitForSelector("[draggable='true']", { timeout: 15_000 });
  });
},
  • tests/e2e/README.md — Corrected the misleading note: "Tests use real Pexels API (ensure API key is valid)" → "Tests use a mocked Pexels API via Playwright route interception (no real API key required)".

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel

vercel Bot commented Feb 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
perplex-image Ready Ready Preview, Comment Feb 23, 2026 10:05pm

Co-authored-by: makuchpatryk <19875907+makuchpatryk@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix multi-select changes based on review feedback fix(e2e): mock Pexels API in all test fixtures and correct README Feb 23, 2026
Copilot AI requested a review from makuchpatryk February 23, 2026 22:04
@makuchpatryk
makuchpatryk marked this pull request as ready for review February 23, 2026 22:06
@makuchpatryk
makuchpatryk merged commit 8240c0c into feat-multi-select Feb 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants